<link href="/css/bootstrap/dist/css/bootstrap.css" type="text/css" rel="stylesheet">

<?php		

	$many_object=array();
	$back_count=1;			
				
	foreach($result->result() as  $val){
		
		$many_object[] = $val->object_id;
		echo 	'<input type="hidden"  class="object_save_id" id="object_'.$val->object_id.'" '.
				' value="'.$val->object_id.'" >';
					
					
					?>
					<tr <?=($back_count % 2 == 0) ? ' class="warning" ' : '' ?> >

						

						<td><!--面積坪數	-->
							<?=$val -> building_area; ?>
							
						</td>

						<td><!--面積坪數	-->
							
							<?=$val -> stakeholders_land_area; ?>
						</td>
						
						<td><!--價格	-->
							<?=$val -> sale_total; ?>
												
						</td>
						
						<td>
							<!--區域路段	-->
							<?=$val -> area; ?>
														
						</td>

						<td>
							
							<?=$val -> house_building; ?>							
						</td>
						
						
						
						<td><!--	屋況樓層-->
							<?=$val -> year_of_construction; ?>
							 
						</td>



						
						<td> 
							<!--物件/市調狀態-->
							<?php

							foreach ($object_state as $key => $value) {

								if ($key == $val -> object_state) {
									echo $value;
								}
							}
							echo $val -> object_state;
							?>
						</td>
						
						<td><!--	經紀人-->
							<?php
						
							if (isset($users[$val -> broker])) {
								echo $users[$val -> broker];
							}
							?>
						</td>
						
						<td>
							<?php
						
							
								echo date('Y-m-d',$val -> ctime);
							
							?>
						</td>
						
						<td>
							<!--物件/市調編號-->
							<?=$val -> object_no ; ?>
						</td>

						
						
						
						
						
						
						
						
						<td>
							
							<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg<?= $val -> object_id?>">
								物件查看
							</button>

							
							<a href="#" id="disable_object" class="<?= $val -> object_id ?>" >
								<img src="/images/disable.png"  border="0" />
							</a>
							
							
								
						</td>
					</tr>
					<?php
					
					$back_count++;
					
					}
					

					$many_object_id='';
					$many_object_flag=true;
					
					foreach($many_object as $count=>$id){
						
						if($many_object_flag){
							$many_object_flag=false;
							$many_object_id.=$id;
						}else{
							$many_object_id.=','.$id;
						}
							
						
					}
					 //echo 'object->'.$many_object_id;					
					?>					
<input type="hidden" value="<?=$many_object_id?>" id="all_object">				